/* eslint-disable vue/no-template-shadow */
<template>
  <a-modal
    title="查看违章信息"
    :width="1400"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
    @cancel="handleCancel"
  >
    <template v-slot:footer>
      <a-button @click="handleSeeVideo" v-show="videoUrl">查看视频</a-button>
      <a-modal :visible="showVideo" @cancel="handleCancel1" title="查看违章视频" :width="900" :height="600">
        <template v-slot:footer>
          <a-button type="primary" @click="handleCancel1">取消播放</a-button>
        </template>
        <video autoplay controls width="100%" id="video">
          <source :src="videoUrl" type="video/mp4">
          Your browser does not support the video tag.
        </video>
      </a-modal>
      <a-button type="primary" @click="$refs.dealAdvice.edit()">点击填写处置意见</a-button>
      <a-button @click="handleCancel">取消</a-button>
      <a-button type="primary" @click="handleSubmit">确定</a-button>
    </template>
    <a-spin :spinning="confirmLoading">
      <a-divider orientation="left" style="font-weight: bold; margin-top: -10px">
        <a-icon type="profile" style="margin-right: 8px;color:rgb(13, 158, 243);"></a-icon>基本信息
      </a-divider>
      <a-row :gutter="24">
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              style="display: none;"
            >
              <a-input v-decorator="['qhseXyViolationId']" disabled/>
            </a-form-item>
            <a-form-item
              label="检查人员"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('userName')">
                <a-input placeholder="请输入检查人员" v-decorator="['userName']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6" >
          <a-form :form="form">
            <a-form-item
              label="数据来源"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('enterSys')">
                <a-input v-decorator="['enterSys']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6" >
          <a-form :form="form">
            <a-form-item
              label="检查时间"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('checkDate')">
                <a-input v-decorator="['checkDate']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6" >
          <a-form :form="form">
            <a-form-item
              label="检查类型"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol">
              <a-input placeholder="请输入检查类型" v-decorator="['check_Type']" disabled/>
            </a-form-item>
            <a-form-item
              style="display: none;"
            >
              <a-input placeholder="请选择数据来源" v-decorator="['enterSys']" disabled/>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form" >
            <a-form-item
              label="录入时间"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('enterTime')">
                <a-input v-decorator="['enterTime']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="违章单位"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="organizationName">
                <a-input placeholder="请选择违章单位" v-model="organizationName" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="作业专业"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('workSpecialty')">
                <a-input placeholder="请选择作业专业" v-decorator="['workSpecialty']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="作业项目"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('workItem')">
                <a-input placeholder="请输入作业项目" v-decorator="['workItem']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="处置意见"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input v-model="management" disabled/>
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
      <a-divider orientation="left" style="font-weight: bold; margin-top: -10px">
        <a-icon type="info-circle" style="margin-right: 8px;color:rgb(13, 158, 243);"></a-icon>关键作业信息</a-divider>
      <a-row :gutter="24">
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="关键作业类型"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('workType')">
                <a-input placeholder="请选择关键作业类型" v-decorator="['workType']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="12" >
          <a-form :form="form">
            <a-form-item
              label="关键作业内容"
              :labelCol="{ sm: { span: 4 } }"
              :wrapperCol="{ sm: { span: 20 } }"
            >
              <a-tooltip :title="form.getFieldValue('workContent')">
                <a-input placeholder="请选择关键作业内容" v-decorator="['workContent']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="作业风险等级"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('workRisk')">
                <a-input placeholder="请输入作业风险等级" v-decorator="['workRisk']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
      <a-divider orientation="left" style="font-weight: bold; margin-top: -10px">
        <a-icon type="user" style="margin-right: 8px;color:rgb(13, 158, 243);"></a-icon>违章人员</a-divider>
      <a-row :gutter="24">
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="违章人员"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('violationUserName')">
                <a-input
                  disabled
                  v-decorator="['violationUserName']"
                  placeholder="请选择违章人员姓名"/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="人员单位"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('violationUserDepart')">
                <a-input
                  disabled
                  v-decorator="['violationUserDepart']"
                  placeholder="请输入违章人员单位"/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="位置区域"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('location')">
                <a-input placeholder="请选择位置区域" v-decorator="['location']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6" >
          <a-form :form="form">
            <a-form-item
              label="用工性质"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('employeeType')">
                <a-input placeholder="请选择用工性质" v-decorator="['employeeType']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="工号/身份证号"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('erp')">
                <a-input
                  disabled
                  v-decorator="['erp']"
                  placeholder="请输入工号/身份证号"/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="违章岗位"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('position')">
                <a-input placeholder="请选择违章岗位" v-decorator="['position']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="年龄"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('age')">
                <a-input placeholder="请选择年龄" v-decorator="['age']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="工龄"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('workYears')">
                <a-input placeholder="请选择工龄" v-decorator="['workYears']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
      <a-divider orientation="left" style="font-weight: bold; margin-top: -10px">
        <a-icon type="exclamation-circle" style="margin-right: 8px;color:rgb(13, 158, 243);"></a-icon>违章信息</a-divider>
      <a-row :gutter="24">
        <a-col :span="18">
          <a-form :form="form">
            <a-form-item
              label="违章条款"
              :labelCol="labelCol_A"
              :wrapperCol="wrapperCol_A"
              style="width: 107.2%; margin-left: -27px"
            >
              <a-tooltip :title="form.getFieldValue('violationClause')">
                <a-input placeholder="请选择违章条款" v-decorator="['violationClause']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
            >
              <a-radio-group v-decorator="['violationTypeCategory']" disabled>
                <a-radio value="通用违章" style="margin-left: 20px">通用违章</a-radio>
                <a-radio value="专业违章" style="margin-left: -10px">专业违章</a-radio>
                <a-radio value="其他" style="margin-left: -10px">其他</a-radio>
              </a-radio-group>
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="18" >
          <a-form :form="form">
            <a-form-item
              label="违章描述"
              :labelCol="labelCol_A"
              :wrapperCol="wrapperCol_A"
              style="width: 107.2%; margin-left: -27px"
            >
              <a-tooltip :title="form.getFieldValue('description')">
                <a-textarea
                  v-decorator="['description']"
                  placeholder="请输入违章描述"
                  :rows="2"
                  :span="40"
                  disabled
                />
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="违章性质"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('violationType')">
                <a-input placeholder="请选择违章性质" v-decorator="['violationType']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="记分"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('score')">
                <a-input placeholder="请输入记分分数" v-decorator="['score']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="罚款"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('fine')">
                <a-input placeholder="请输入罚款" v-decorator="['fine']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="违章类别"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="violationCategory">
                <a-input placeholder="请选择违章类别" v-model="violationCategory" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="检查方式"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('inspectionMethod')">
                <a-input v-decorator="['inspectionMethod']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="对应体系要素"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('hseElement')">
                <a-input placeholder="请选择对应体系要素" v-decorator="['hseElement']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="原因分析"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('causeAnalysis')">
                <a-input placeholder="请选择原因分析" v-decorator="['causeAnalysis']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="对应安全沟通"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('observeComm')">
                <a-input placeholder="请选择对应安全沟通" v-decorator="['observeComm']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="归属部门"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('directDepartment')">
                <a-input placeholder="请选择归属部门" v-decorator="['directDepartment']" disabled/>
              </a-tooltip>
            </a-form-item>
            <a-form-item
              style="display: none;"
            >
              <a-input v-decorator="['userId']" />
            </a-form-item>
            <a-form-item
              style="display: none;"
            >
              <a-input v-decorator="['pic']" />
            </a-form-item>
            <a-form-item
              style="display: none;"
            >
              <a-input v-model="organizationId" />
            </a-form-item>
            <a-form-item
              style="display: none;"
            >
              <a-input v-decorator="['violationUserId']" />
            </a-form-item>
          </a-form>
        </a-col>
        <a-col :span="6">
          <a-form :form="form">
            <a-form-item
              label="可能后果"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tooltip :title="form.getFieldValue('potentialConsequence')">
                <a-input placeholder="请选择可能后果" v-decorator="['potentialConsequence']" disabled/>
              </a-tooltip>
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
      <a-row style="margin-bottom: -50px">
        <a-col :span="12">
          <a-form :form="form">
            <a-form-item label="图片" :labelCol="labelCol_A" :wrapperCol="wrapperCol_A" has-feedback>
              <span v-show="showFile">无</span>
              <a-upload
                name="file"
                list-type="picture-card"
                :file-list="fileList"
                data-type="jpg|png|jpeg|JPG|PNG|JPEG"
                ref="Pics"
                @preview="handlePreview"
                :show-upload-list="showUploadList"
                multiple
              >
              </a-upload>
              <a-modal :visible="previewVisible" :footer="null" @cancel="handlePicCancel">
                <img alt="example" style="width: 100%" :src="previewImage" />
              </a-modal>
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
      <deal-advice ref="dealAdvice" @ok="handleOk"></deal-advice>
    </a-spin>
  </a-modal>
</template>
<script>
  import moment from 'moment'
  import VueTextTruncate from 'vue-text-truncate'
  import { QHSEXyViolationDetail } from '@/api/modular/system/QHSEXyViolation'
  import { DatePicker, TreeSelect, Select, Input, Upload } from 'ant-design-vue'
  import { STable, XCard, XDown } from '@/components'
  import { getQHSEViolationCategoryLBTree } from '@/api/modular/system/QHSEViolationCategory'
  import dealAdvice from '@/components/Danger/dealAdvice'
  import { getEditManagement } from '@/api/modular/system/QHSEHazardQuery'
  function getBase64 (file) {
    return new Promise((resolve, reject) => {
      const reader = new FileReader()
      reader.readAsDataURL(file)
      reader.onload = () => resolve(reader.result)
      reader.onerror = error => reject(error)
    })
  }
  export default {
    components: {
      XDown,
      XCard,
      STable,
      DatePicker,
      TreeSelect,
      Select,
      Input,
      Upload,
      VueTextTruncate,
      dealAdvice
    },
    data () {
      return {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 8 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 }
        },
        labelCol_A: {
          xs: { span: 12 },
          sm: { span: 3 }
        },
        wrapperCol_A: {
          xs: { span: 36 },
          sm: { span: 20 }
        },
        labelCol_S: {
          xs: { span: 12 },
          sm: { span: 0 }
        },
        wrapperCol_S: {
          xs: { span: 20 },
          sm: { span: 8 }
        },
        count: 1,
        visible: false,
        confirmLoading: false,
        data: [],
        replaceFields: {
          children: 'children',
          title: 'title',
          key: 'id',
          value: 'id'
        },
        form: this.$form.createForm(this),
        Modalvisible: false,
        videoUrl: '',
        showVideo: false,
        files: [],
        previewVisible: false,
        previewImage: '',
        flag: true,
        fileList: [],
        violationCategory: '',
        organizationId: '',
        organizationName: '',
        showUploadList: {
          showRemoveIcon: false,
          showDownloadIcon: false,
          showPreviewIcon: true
        },
        QHSEViolationCategoryLBTree: [],
        showFile: false,
        management: '',
        queryParam1: {}
      }
    },
    methods: {
      moment,
      handleOk(value) {
        // console.log('value', value)
        this.management = value
        console.log('management', this.management)
        this.videoUrl = ''
        // this.queryParam
      },
      // 关闭模态框（图片预览）
      handlePicCancel () {
        this.previewImage = ''
        this.previewVisible = false
      },
      // 打开模态框（图片预览）
      async handlePreview (file) {
        if (!file.url && !file.preview) {
          file.preview = await getBase64(file.originFileObj)
        }
        this.previewImage = file.url || file.preview
        this.previewVisible = true
      },
      getQHSEViolationCategoryLBTree() {
        getQHSEViolationCategoryLBTree().then((res) => {
          this.formLoading = false
          if (!res.success) {
            this.QHSEViolationCategoryLBTree = []
            return
          }
          this.QHSEViolationCategoryLBTree = res.data
        })
      },
      QHSEXyViolationDetail(text) {
        QHSEXyViolationDetail(text).then((res) => {
            console.log('res:', res)
            // setTimeout(() => {
              this.form.setFieldsValue({
              // 违章ID
              qhseXyViolationId: res.data.qhseXyViolationId,
              // 检查人员ID
              userId: res.data.userId,
              // 检查人员姓名
              userName: res.data.userName,
              // 检查时间
              checkDate: res.data.checkDate ? res.data.checkDate.replace('T', ' ') : undefined,
              // 录入时间
              enterTime: res.data.enterTime ? res.data.enterTime.replace('T', ' ') : undefined,
              // 数据来源
              enterSys: res.data.enterSys,
              // 检查类型
              check_Type: res.data.check_Type,
              // 作业项目
              workItem: res.data.workItem,
              // 关键作业内容
              workContent: res.data.workContent,
              // 作业风险等级
              workRisk: res.data.workRisk,
              // 关键作业类型
              workType: res.data.workType,
              // 作业专业
              workSpecialty: res.data.workSpecialty,
              // 位置区域
              location: res.data.location,
              // 描述
              description: res.data.description,
              // 违章性质
              violationType: res.data.violationType,
              // 违章类别
              // 违章性质分类
              violationTypeCategory: res.data.violationTypeCategory,
              // 违章条款
              violationClause: res.data.violationClause,
              // 体系要素
              hseElement: res.data.hseElement,
              // 安全沟通
              observeComm: res.data.observeComm,
              // 原因分析
              causeAnalysis: res.data.causeAnalysis,
              // 归属直线部门
              directDepartment: res.data.directDepartment,
              // 可能后果
              potentialConsequence: res.data.potentialConsequence,
              // 检查方式
              inspectionMethod: res.data.inspectionMethod,
              // 违章人员ID
              violationUserId: res.data.violationUserId,
              // 违章人员姓名
              violationUserName: res.data.violationUserName,
              // 违章人员单位名称
              violationUserDepart: res.data.violationUserDepart,
              // 违章人员工号/身份证号
              erp: res.data.erp,
              // 年龄
              age: res.data.age,
              // 工龄
              workYears: res.data.workYears,
              // 用工性质
              employeeType: res.data.employeeType,
              // 违章岗位
              position: res.data.position,
              // 记分
              score: res.data.score,
              // 罚款
              fine: res.data.fine,
              // 图片（不用）
              pic: res.data.pic
              // files imageHash organizationId organizationName violationCategory
          })
        // }, 1)
            // 违章类别
            this.violationCategory = res.data.violationCategory
            // 被检查单位id
            this.organizationId = res.data.organizationId
            // 被检查单位名称
            this.organizationName = res.data.organizationName
            this.files = res.data.files
            this.management = res.data.management
            this.queryParam1.qhseXyViolationId = res.data.qhseXyViolationId
            // this.videoUrl = 'https://media.w3.org/2010/05/sintel/trailer.mp4'
            this.videoUrl = res.data.videoUrl
            if (this.files.length === 0) {
              this.showFile = true
            } else {
              this.showFile = false
            }
             // 在组件创建时，将 files 数组转换为 uploadFileList 数组
            this.fileList = this.files.map((file, index) => {
              const suffix = file.name.split('.').pop()
              return {
                uid: `file-${index}`,
                name: file.name,
                status: 'done',
                url: `data:image/${suffix};base64,${file.base64Content}`,
                thumbUrl: ''
              }
            })
            return res.data
        })
      },
      queryDetail(record) {
        const param = { 'id': record.qhseXyViolationId }
        this.QHSEXyViolationDetail(param)
      },
      handleSeeVideo() {
        this.showVideo = true
        this.$nextTick(() => {
          const videoPlayer = document.getElementById('video')
          if (videoPlayer) {
            videoPlayer.play()
          }
        })
      },
      // 初始化方法
      edit(record) {
        this.queryDetail(record)
        // console.log('--this is record from edit--', record)
        this.confirmLoading = true
        this.visible = true
        this.getQHSEViolationCategoryLBTree()
        // 基本信息加人表单
        this.confirmLoading = false
      },
      handleSubmit() {
        this.queryParam1.management = this.management
        this.getEditManagement()
        this.confirmLoading = false
        this.visible = false
      },
      getEditManagement() {
        console.log('this.queryParam1', this.queryParam1)
        getEditManagement(this.queryParam1).then(res => {
          if (res.code === 200 && this.queryParam1) {
            this.$message.success('填写处置意见成功！')
          }
        })
      },
      handleCancel () {
        this.form.resetFields()
        this.visible = false
        // 清理子表单中数据
        // this.queryParam1.management = this.management
        // this.getEditManagement()
        this.data = []
        this.videoUrl = ''
      },
      handleModalCancel() {
        this.Modalvisible = false
      },
      handleOk1 () {
        this.showVideo = false
        const video = document.getElementById('video')
        video.pause()
        // video.currentTime = 0 // 设置当前视频的开始时间为从头开始
      },
      handleCancel1 () {
        // this.form.resetFields()
        this.showVideo = false
        const video = document.getElementById('video')
        video.pause()
        // video.currentTime = 0
      }
    }
  }
</script>
<style scoped>
  *[disabled] {
    color: black;
    background-color: whitesmoke;
    cursor: not-allowed;
    opacity: 0.5;
  }
  .ant-select-disabled {
    color: black;
    cursor: not-allowed;
    opacity: 0.5;
  }
</style>
